# coding=utf-8
class R(object):
    def __init__(self) -> None:
        self.code = 0
        self.msg = "ok"
        self.data = None
        self.count = 0

    def to_dict(self):
        return self.__dict__

    def setResponse(self, code, msg, data=None, count=0):
        self.code = code
        self.msg = msg
        self.data = data
        self.count = count
        return self